/**
 * 将数字进行格式化
 * -> numberFormat(1222.23)
 * -> "1,222.23"
 * -> numberFormat(1222)
 * -> "1,222"
 * @param {number} num 
 */
function numberFormat(num) {
    let num = num+''
    return num.replace(/(?=(\B)(\d{3})+[/.|$])/g, ',')
}
